// 引入mockjs
const Mock = require('mockjs')
const Random = Mock.Random

// 模拟请求的延迟
Mock.setup({
  timeout: 0 - 300
})

// let dataArr = Mock.mock({
//   'array|10-100': [{
//     userName: Random.csentence(3),
//     projectName: Random.csentence(5, 7),
//     time: Random.date('yyyy-MM-dd'),
//     status: Random.boolean()
//   }]
// })
// console.log(dataArr)

// 平台内部调用日志
Mock.mock('/api/origin/innerLog', (req, res) => {
  return Mock.mock({
    'innerLogList|10': [{
      userName: Random.csentence(3),
      projectName: Random.csentence(5, 7),
      time: Random.date('yyyy-MM-dd'),
      status: Random.boolean()
    }]
  })
})

// 平台外部调用日志
Mock.mock('/api/origin/outerLog', (req, res) => {
  return Mock.mock({
    'innerLogList|10': [{
      userName: Random.csentence(3),
      projectName: Random.csentence(5, 7),
      time: Random.date('yyyy-MM-dd'),
      status: Random.boolean()
    }]
  })
})
